package com.meisupic.copyright.domain.po;

import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "ecs_goods")
public class Goods {

  private Long goodsId;
  private Short catId;
  private String goodsSn;
  private String goodsName;
  private String goodsNameStyle;
  private Integer clickCount;
  private Short brandId;
  private String providerName;
  private Long goodsNumber;
  private BigDecimal goodsWeight;
  private BigDecimal marketPrice;
  private Short virtualSales;
  private BigDecimal shopPrice;
  private BigDecimal promotePrice;
  private Integer promoteStartDate;
  private Integer promoteEndDate;
  private Byte warnNumber;
  private String keywords;
  private String goodsBrief;
  private String goodsDesc;
  private String goodsThumb;
  private String goodsImg;
  private String originalImg;
  private Byte isReal;
  private String extensionCode;
  private Byte isOnSale;
  private Byte isAloneSale;
  private Byte isShipping;
  private Integer integral;
  private Integer addTime;
  private Short sortOrder;
  private Byte isDelete;
  private Byte isBest;
  private Byte isNew;
  private Byte isHot;
  private Byte isPromote;
  private Byte bonusTypeId;
  private Integer lastUpdate;
  private Short goodsType;
  private String sellerNote;
  private Integer giveIntegral;
  private Integer rankIntegral;
  private Short suppliersId;
  private Byte isCheck;
  private String subaccount;
  private String goodsSize;
  private Long userId;
  private Byte designType;
  private String dciCode;

  @Id
  @Column(name = "goods_id", nullable = false)
  public Long getGoodsId() {
    return goodsId;
  }

  public void setGoodsId(Long goodsId) {
    this.goodsId = goodsId;
  }

  @Basic
  @Column(name = "cat_id", nullable = false)
  public Short getCatId() {
    return catId;
  }

  public void setCatId(Short catId) {
    this.catId = catId;
  }

  @Basic
  @Column(name = "goods_sn", nullable = false, length = 60)
  public String getGoodsSn() {
    return goodsSn;
  }

  public void setGoodsSn(String goodsSn) {
    this.goodsSn = goodsSn;
  }

  @Basic
  @Column(name = "goods_name", nullable = false, length = 120)
  public String getGoodsName() {
    return goodsName;
  }

  public void setGoodsName(String goodsName) {
    this.goodsName = goodsName;
  }

  @Basic
  @Column(name = "goods_name_style", nullable = false, length = 60)
  public String getGoodsNameStyle() {
    return goodsNameStyle;
  }

  public void setGoodsNameStyle(String goodsNameStyle) {
    this.goodsNameStyle = goodsNameStyle;
  }

  @Basic
  @Column(name = "click_count", nullable = false)
  public Integer getClickCount() {
    return clickCount;
  }

  public void setClickCount(Integer clickCount) {
    this.clickCount = clickCount;
  }

  @Basic
  @Column(name = "brand_id", nullable = false)
  public Short getBrandId() {
    return brandId;
  }

  public void setBrandId(Short brandId) {
    this.brandId = brandId;
  }

  @Basic
  @Column(name = "provider_name", nullable = true, length = 100)
  public String getProviderName() {
    return providerName;
  }

  public void setProviderName(String providerName) {
    this.providerName = providerName;
  }

  @Basic
  @Column(name = "goods_number", nullable = false)
  public Long getGoodsNumber() {
    return goodsNumber;
  }

  public void setGoodsNumber(Long goodsNumber) {
    this.goodsNumber = goodsNumber;
  }

  @Basic
  @Column(name = "goods_weight", nullable = false, precision = 3)
  public BigDecimal getGoodsWeight() {
    return goodsWeight;
  }

  public void setGoodsWeight(BigDecimal goodsWeight) {
    this.goodsWeight = goodsWeight;
  }

  @Basic
  @Column(name = "market_price", nullable = false, precision = 2)
  public BigDecimal getMarketPrice() {
    return marketPrice;
  }

  public void setMarketPrice(BigDecimal marketPrice) {
    this.marketPrice = marketPrice;
  }

  @Basic
  @Column(name = "virtual_sales", nullable = false)
  public Short getVirtualSales() {
    return virtualSales;
  }

  public void setVirtualSales(Short virtualSales) {
    this.virtualSales = virtualSales;
  }

  @Basic
  @Column(name = "shop_price", nullable = false, precision = 2)
  public BigDecimal getShopPrice() {
    return shopPrice;
  }

  public void setShopPrice(BigDecimal shopPrice) {
    this.shopPrice = shopPrice;
  }

  @Basic
  @Column(name = "promote_price", nullable = false, precision = 2)
  public BigDecimal getPromotePrice() {
    return promotePrice;
  }

  public void setPromotePrice(BigDecimal promotePrice) {
    this.promotePrice = promotePrice;
  }

  @Basic
  @Column(name = "promote_start_date", nullable = false)
  public Integer getPromoteStartDate() {
    return promoteStartDate;
  }

  public void setPromoteStartDate(Integer promoteStartDate) {
    this.promoteStartDate = promoteStartDate;
  }

  @Basic
  @Column(name = "promote_end_date", nullable = false)
  public Integer getPromoteEndDate() {
    return promoteEndDate;
  }

  public void setPromoteEndDate(Integer promoteEndDate) {
    this.promoteEndDate = promoteEndDate;
  }

  @Basic
  @Column(name = "warn_number", nullable = false)
  public Byte getWarnNumber() {
    return warnNumber;
  }

  public void setWarnNumber(Byte warnNumber) {
    this.warnNumber = warnNumber;
  }

  @Basic
  @Column(name = "keywords", nullable = true, length = 1000)
  public String getKeywords() {
    return keywords;
  }

  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }

  @Basic
  @Column(name = "goods_brief", nullable = true, length = -1)
  public String getGoodsBrief() {
    return goodsBrief;
  }

  public void setGoodsBrief(String goodsBrief) {
    this.goodsBrief = goodsBrief;
  }

  @Basic
  @Column(name = "goods_desc", nullable = false, length = -1)
  public String getGoodsDesc() {
    return goodsDesc;
  }

  public void setGoodsDesc(String goodsDesc) {
    this.goodsDesc = goodsDesc;
  }

  @Basic
  @Column(name = "goods_thumb", nullable = true, length = 255)
  public String getGoodsThumb() {
    return goodsThumb;
  }

  public void setGoodsThumb(String goodsThumb) {
    this.goodsThumb = goodsThumb;
  }

  @Basic
  @Column(name = "goods_img", nullable = true, length = 255)
  public String getGoodsImg() {
    return goodsImg;
  }

  public void setGoodsImg(String goodsImg) {
    this.goodsImg = goodsImg;
  }

  @Basic
  @Column(name = "original_img", nullable = true, length = 255)
  public String getOriginalImg() {
    return originalImg;
  }

  public void setOriginalImg(String originalImg) {
    this.originalImg = originalImg;
  }

  @Basic
  @Column(name = "is_real", nullable = false)
  public Byte getIsReal() {
    return isReal;
  }

  public void setIsReal(Byte isReal) {
    this.isReal = isReal;
  }

  @Basic
  @Column(name = "extension_code", nullable = true, length = 30)
  public String getExtensionCode() {
    return extensionCode;
  }

  public void setExtensionCode(String extensionCode) {
    this.extensionCode = extensionCode;
  }

  @Basic
  @Column(name = "is_on_sale", nullable = false)
  public Byte getIsOnSale() {
    return isOnSale;
  }

  public void setIsOnSale(Byte isOnSale) {
    this.isOnSale = isOnSale;
  }

  @Basic
  @Column(name = "is_alone_sale", nullable = false)
  public Byte getIsAloneSale() {
    return isAloneSale;
  }

  public void setIsAloneSale(Byte isAloneSale) {
    this.isAloneSale = isAloneSale;
  }

  @Basic
  @Column(name = "is_shipping", nullable = false)
  public Byte getIsShipping() {
    return isShipping;
  }

  public void setIsShipping(Byte isShipping) {
    this.isShipping = isShipping;
  }

  @Basic
  @Column(name = "integral", nullable = false)
  public Integer getIntegral() {
    return integral;
  }

  public void setIntegral(Integer integral) {
    this.integral = integral;
  }

  @Basic
  @Column(name = "add_time", nullable = false)
  public Integer getAddTime() {
    return addTime;
  }

  public void setAddTime(Integer addTime) {
    this.addTime = addTime;
  }

  @Basic
  @Column(name = "sort_order", nullable = false)
  public Short getSortOrder() {
    return sortOrder;
  }

  public void setSortOrder(Short sortOrder) {
    this.sortOrder = sortOrder;
  }

  @Basic
  @Column(name = "is_delete", nullable = false)
  public Byte getIsDelete() {
    return isDelete;
  }

  public void setIsDelete(Byte isDelete) {
    this.isDelete = isDelete;
  }

  @Basic
  @Column(name = "is_best", nullable = false)
  public Byte getIsBest() {
    return isBest;
  }

  public void setIsBest(Byte isBest) {
    this.isBest = isBest;
  }

  @Basic
  @Column(name = "is_new", nullable = false)
  public Byte getIsNew() {
    return isNew;
  }

  public void setIsNew(Byte isNew) {
    this.isNew = isNew;
  }

  @Basic
  @Column(name = "is_hot", nullable = false)
  public Byte getIsHot() {
    return isHot;
  }

  public void setIsHot(Byte isHot) {
    this.isHot = isHot;
  }

  @Basic
  @Column(name = "is_promote", nullable = false)
  public Byte getIsPromote() {
    return isPromote;
  }

  public void setIsPromote(Byte isPromote) {
    this.isPromote = isPromote;
  }

  @Basic
  @Column(name = "bonus_type_id", nullable = false)
  public Byte getBonusTypeId() {
    return bonusTypeId;
  }

  public void setBonusTypeId(Byte bonusTypeId) {
    this.bonusTypeId = bonusTypeId;
  }

  @Basic
  @Column(name = "last_update", nullable = false)
  public Integer getLastUpdate() {
    return lastUpdate;
  }

  public void setLastUpdate(Integer lastUpdate) {
    this.lastUpdate = lastUpdate;
  }

  @Basic
  @Column(name = "goods_type", nullable = false)
  public Short getGoodsType() {
    return goodsType;
  }

  public void setGoodsType(Short goodsType) {
    this.goodsType = goodsType;
  }

  @Basic
  @Column(name = "seller_note", nullable = false, length = 255)
  public String getSellerNote() {
    return sellerNote;
  }

  public void setSellerNote(String sellerNote) {
    this.sellerNote = sellerNote;
  }

  @Basic
  @Column(name = "give_integral", nullable = false)
  public Integer getGiveIntegral() {
    return giveIntegral;
  }

  public void setGiveIntegral(Integer giveIntegral) {
    this.giveIntegral = giveIntegral;
  }

  @Basic
  @Column(name = "rank_integral", nullable = false)
  public Integer getRankIntegral() {
    return rankIntegral;
  }

  public void setRankIntegral(Integer rankIntegral) {
    this.rankIntegral = rankIntegral;
  }

  @Basic
  @Column(name = "suppliers_id", nullable = true)
  public Short getSuppliersId() {
    return suppliersId;
  }

  public void setSuppliersId(Short suppliersId) {
    this.suppliersId = suppliersId;
  }

  @Basic
  @Column(name = "is_check", nullable = true)
  public Byte getIsCheck() {
    return isCheck;
  }

  public void setIsCheck(Byte isCheck) {
    this.isCheck = isCheck;
  }

  @Basic
  @Column(name = "subaccount", nullable = true, length = 10)
  public String getSubaccount() {
    return subaccount;
  }

  public void setSubaccount(String subaccount) {
    this.subaccount = subaccount;
  }

  @Basic
  @Column(name = "goods_size", nullable = true, length = 10)
  public String getGoodsSize() {
    return goodsSize;
  }

  public void setGoodsSize(String goodsSize) {
    this.goodsSize = goodsSize;
  }

  @Basic
  @Column(name = "user_id", nullable = true)
  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  @Basic
  @Column(name = "design_type", nullable = true)
  public Byte getDesignType() {
    return designType;
  }

  public void setDesignType(Byte designType) {
    this.designType = designType;
  }

  @Basic
  @Column(name = "dci_code", nullable = true, length = 60)
  public String getDciCode() {
    return dciCode;
  }

  public void setDciCode(String dciCode) {
    this.dciCode = dciCode;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Goods that = (Goods) o;
    return Objects.equals(goodsId, that.goodsId) &&
        Objects.equals(catId, that.catId) &&
        Objects.equals(goodsSn, that.goodsSn) &&
        Objects.equals(goodsName, that.goodsName) &&
        Objects.equals(goodsNameStyle, that.goodsNameStyle) &&
        Objects.equals(clickCount, that.clickCount) &&
        Objects.equals(brandId, that.brandId) &&
        Objects.equals(providerName, that.providerName) &&
        Objects.equals(goodsNumber, that.goodsNumber) &&
        Objects.equals(goodsWeight, that.goodsWeight) &&
        Objects.equals(marketPrice, that.marketPrice) &&
        Objects.equals(virtualSales, that.virtualSales) &&
        Objects.equals(shopPrice, that.shopPrice) &&
        Objects.equals(promotePrice, that.promotePrice) &&
        Objects.equals(promoteStartDate, that.promoteStartDate) &&
        Objects.equals(promoteEndDate, that.promoteEndDate) &&
        Objects.equals(warnNumber, that.warnNumber) &&
        Objects.equals(keywords, that.keywords) &&
        Objects.equals(goodsBrief, that.goodsBrief) &&
        Objects.equals(goodsDesc, that.goodsDesc) &&
        Objects.equals(goodsThumb, that.goodsThumb) &&
        Objects.equals(goodsImg, that.goodsImg) &&
        Objects.equals(originalImg, that.originalImg) &&
        Objects.equals(isReal, that.isReal) &&
        Objects.equals(extensionCode, that.extensionCode) &&
        Objects.equals(isOnSale, that.isOnSale) &&
        Objects.equals(isAloneSale, that.isAloneSale) &&
        Objects.equals(isShipping, that.isShipping) &&
        Objects.equals(integral, that.integral) &&
        Objects.equals(addTime, that.addTime) &&
        Objects.equals(sortOrder, that.sortOrder) &&
        Objects.equals(isDelete, that.isDelete) &&
        Objects.equals(isBest, that.isBest) &&
        Objects.equals(isNew, that.isNew) &&
        Objects.equals(isHot, that.isHot) &&
        Objects.equals(isPromote, that.isPromote) &&
        Objects.equals(bonusTypeId, that.bonusTypeId) &&
        Objects.equals(lastUpdate, that.lastUpdate) &&
        Objects.equals(goodsType, that.goodsType) &&
        Objects.equals(sellerNote, that.sellerNote) &&
        Objects.equals(giveIntegral, that.giveIntegral) &&
        Objects.equals(rankIntegral, that.rankIntegral) &&
        Objects.equals(suppliersId, that.suppliersId) &&
        Objects.equals(isCheck, that.isCheck) &&
        Objects.equals(subaccount, that.subaccount) &&
        Objects.equals(goodsSize, that.goodsSize) &&
        Objects.equals(userId, that.userId) &&
        Objects.equals(designType, that.designType) &&
        Objects.equals(dciCode, that.dciCode);
  }

  @Override
  public int hashCode() {

    return Objects
        .hash(goodsId, catId, goodsSn, goodsName, goodsNameStyle, clickCount, brandId, providerName,
            goodsNumber, goodsWeight, marketPrice, virtualSales, shopPrice, promotePrice,
            promoteStartDate, promoteEndDate, warnNumber, keywords, goodsBrief, goodsDesc,
            goodsThumb,
            goodsImg, originalImg, isReal, extensionCode, isOnSale, isAloneSale, isShipping,
            integral,
            addTime, sortOrder, isDelete, isBest, isNew, isHot, isPromote, bonusTypeId, lastUpdate,
            goodsType, sellerNote, giveIntegral, rankIntegral, suppliersId, isCheck, subaccount,
            goodsSize, userId, designType, dciCode);
  }
}
